<template>
	<view>
		<view class="dataBlock">
			<u-subsection mode="button" bgColor="#FFF4F1;" :list="list" :current="curNow"
				@change="sectionChange"></u-subsection>
		</view>
		<view class="dataCon">
			<view class="block">
				<image src="../../static/databg.png"></image>
				<view class="con">
					<view>净收益</view>
					<view>100</view>
				</view>
			</view>
			<view class="blockItem">
				<view class="title">
					<view class="leftIcon"></view>
					自销收益
				</view>
				<view class="top-con">
					<ul>
						<li>
							<view class="titles">
								单数
							</view>
							<view class="font">
								8
							</view>
						</li>
						<u-line direction="col" color="#ffffff" length="66rpx" :dashed="false"
							margin="54rpx 0"></u-line>
						<li>

							<view class="titles">
								销售额
							</view>
							<view class="font">
								9
							</view>
						</li>
						<u-line direction="col" color="#ffffff" length="66rpx" :dashed="false"
							margin="54rpx 0"></u-line>
						<li>
							<view class="titles">
								差价
							</view>
							<view class="font">
								8
							</view>

						</li>
					</ul>
				</view>

			</view>

			<view class="blockItem">
				<view class="title">
					<view class="leftIcon"></view>
					团队数据
				</view>
				<view class="top-con2">
					<ul>
						<li>

							<view class="titles">
								单数
							</view>
							<view class="font">
								8
							</view>
						</li>
						<u-line direction="col" color="#ffffff" length="66rpx" :dashed="false"
							margin="54rpx 0"></u-line>
						<li>

							<view class="titles">
								销售额
							</view>
							<view class="font">
								9
							</view>
						</li>
						<u-line direction="col" color="#ffffff" length="66rpx" :dashed="false"
							margin="54rpx 0"></u-line>
						<li>
							<view class="titles">
								上交额
							</view>
							<view class="font">
								8
							</view>

						</li>
						<u-line direction="col" color="#ffffff" length="66rpx" :dashed="false"
							margin="54rpx 0"></u-line>
						<li>
							<view class="titles">
								差价
							</view>
							<view class="font">
								8
							</view>

						</li>
					</ul>
				</view>

			</view>
			<view class="blockItem">
				<view class="title">
					<view class="leftIcon"></view>
					大团队数据
				</view>
				<view class="top-con2">
					<ul>
						<li>

							<view class="titles">
								总单量
							</view>
							<view class="font">
								8
							</view>
						</li>
						<u-line direction="col" color="#ffffff" length="66rpx" :dashed="false"
							margin="54rpx 0"></u-line>
						<li>

							<view class="titles">
								有效单量
							</view>
							<view class="font">
								9
							</view>
						</li>
						<u-line direction="col" color="#ffffff" length="66rpx" :dashed="false"
							margin="54rpx 0"></u-line>
						<li>
							<view class="titles">
								上交额
							</view>
							<view class="font">
								8
							</view>

						</li>
						<u-line direction="col" color="#ffffff" length="66rpx" :dashed="false"
							margin="54rpx 0"></u-line>
						<li>
							<view class="titles">
								有效金额
							</view>
							<view class="font">
								8
							</view>
						</li>
					</ul>
				</view>

			</view>
			<view class="cellgroup">
				<u-cell-group :border="false">
					<u-cell :title="item.title" isLink @click="go(item.url)" v-for="(item,index) in itemList">
						<view slot="icon">
							<image class="iconSize" :src="item.img" mode="aspectFill"></image>
						</view>

					</u-cell>





				</u-cell-group>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: ['20日', '21日', '22日', '本月', '上月'],
				curNow: 0,
				itemList: [{
					title: "分销数据汇总",
					img: "../../static/data/dataIcon1.png",
					url: "./one/one"
				}, {
					title: "分销数据明细",
					img: "../../static/data/dataIcon2.png",
					url: "./two/two"
				}, {
					title: "产品数据查询",
					img: "../../static/data/dataIcon3.png",
					url: "./three/three"
				}, {
					title: "团队业务查询",
					img: "../../static/data/dataIcon4.png",
					url: "./four/four"
				}, {
					title: "销售龙虎榜",
					img: "../../static/data/dataIcon5.png",
					url: "./five/five"
				}, {
					title: "销售排行榜",
					img: "../../static/data/dataIcon6.png",
					url: "./six/six"
				}, {
					title: "代理人查询",
					img: "../../static/data/dataIcon7.png",
					url: "./seven/seven"
				}],
			}
		},
		methods: {
			sectionChange(index) {
				this.curNow = index;
				console.log(this.curNow)
			},
			go(url) {
				if (url) {
					uni.navigateTo({
						url: url
					})
				} else {
					uni.$u.toast("11")
				}

			}
		}
	}
</script>

<style lang="scss">
	.u-subsection--button__bar.data-v-244377f2 {
		background-color: #FF3B06 !important;
		border-radius: 3px !important;
	}

	.dataBlock {
		width: 722rpx;
		height: auto;
		margin: 0 auto;
		margin-top: 32rpx;
		font-size: 30rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: bold;
		color: #333333;
	}

	.dataCon {
		width: 682rpx;
		height: auto;
		margin: 0 auto;
		margin-top: 30rpx;

		.block {
			width: 100%;
			height: 160rpx;
			position: relative;
			margin-bottom: 10rpx;

			image {
				position: absolute;
				width: 100%;
				height: 100%;
			}

			.con {
				position: relative;
				left: 0;
				top: 0;
				text-align: center;

				view:first-child {
					font-size: 30rpx;
					font-family: PingFang SC-Bold, PingFang SC;
					font-weight: bold;
					color: #FFFFFF;
					line-height: 42rpx;
					padding-top: 25rpx;
				}

				view:last-child {
					font-size: 46rpx;
					font-family: PingFang SC-Bold, PingFang SC;
					font-weight: bold;
					color: #FFFFFF;
					line-height: 65rpx;
				}
			}
		}

		.blockItem {
			border-radius: 16rpx;
			background-color: #F9F9F9;
			margin: 0 auto;
			margin-top: 20rpx;

			ul {
				padding: 0 !important;

				li {
					flex: 1;
					display: flex;
					flex-direction: column;
					align-items: center;
					justify-content: center;
				}
			}

			.title {
				font-size: 32rpx;
				font-family: PingFang SC-Bold, PingFang SC;
				font-weight: bold;
				color: #333333;
				line-height: 42rpx;
				text-align: left;
				display: flex;
				padding-top: 20rpx;

				.leftIcon {
					width: 6rpx;
					height: 32rpx;
					background: #FF3B06;
					border-radius: 3rpx 3rpx 3rpx 3rpx;
					display: inline-block;
					margin: 6rpx 10rpx 5rpx 20rpx;
				}

			}
		}
	}

	.top-con {
		ul {
			display: flex;
			// flex-wrap: wrap;
			align-items: center;
			justify-content: center;
			padding: 0 !important;
		}

		li {
			list-style: none;
			flex: 1;
			text-align: center;
			margin: 0 auto;

			.font {
				font-size: 40rpx;
				font-family: PingFang SC-Bold, PingFang SC;
				font-weight: bold;
				line-height: 40rpx;
				margin-top: 10rpx;
			}

			.titles {
				font-size: 28rpx;
				font-family: PingFang SC-Medium, PingFang SC;
				font-weight: 500;
				color: #333333;
				line-height: 40rpx;
				text-align: center;
			}
		}
	}

	.top-con2 {
		margin: 0 auto;
		float: none;
		overflow: hidden;
		color: #333333;

		ul {
			display: flex;
			flex-wrap: wrap;
		}

		li {
			list-style: none;
			width: 140rpx;
			height: 144rpx;
			text-align: center;
			margin: 0 auto;

			.font {
				font-size: 40rpx;
				font-family: PingFang SC-Bold, PingFang SC;
				font-weight: bold;
				line-height: 40rpx;
				margin-top: 10rpx;
			}

			.titles {
				font-size: 28rpx;
				font-family: PingFang SC-Medium, PingFang SC;
				font-weight: 500;
				color: #333333;
				line-height: 40rpx;
				text-align: center;
			}
		}
	}

	.cellgroup {
		width: 682rpx;
		height: auto;
		border-radius: 16rpx;
		background-color: #F9F9F9;
		margin: 0 auto;
		margin-top: 20rpx;
		margin-bottom: 84rpx;

		.iconSize {
			width: 42rpx;
			height: 42rpx;
		}

		.u-slot-value {
			background-color: #FE4030;
			color: #FFFFFF;
			padding: 2rpx 10rpx;
			border-radius: 50rpx;
		}
	}
</style>